home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / hamradio / extra23.sit / Extra Ham Test / background_7720.txt < prev    next >
Text File  |  1991-04-08  |  9KB  |  402 lines

  1. -- background: 7720 from stack: in
  2. -- bmap block id: 8153
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Test
  6. ----- HyperTalk script -----
  7. On openCard
  8.   global questans, questkey, rightone, group
  9.   hide field review
  10.   hide background button "Correct!"
  11.   set hilight of background button A to false
  12.   set hilight of background button B to false
  13.   set hilight of background button C to false
  14.   set hilight of background button D to false
  15.   get the number of card
  16.   -- ΓÇóΓÇóΓÇó choose question # or card # option
  17.   put "Question #" & group into field "Q#" -- question # option
  18.   -- put "Question #"&it-2 into field "Q#" -- card # option
  19.   put rightone into item group of questkey
  20.   put item group of questans into foo
  21.   if foo is not empty then set hilight of background button foo to true
  22. end openCard
  23.  
  24. on closeCard
  25.   set lockScreen to true
  26.   set hilight of background button A to false
  27.   set hilight of background button B to false
  28.   set hilight of background button C to false
  29.   set hilight of background button D to false
  30.   set lockScreen to false
  31.   hide background button "Correct!"
  32.   hide field review
  33. end closeCard
  34.  
  35. on idle
  36.   global time1
  37.   -- comment out next line (exit idle) if you want a time limit on test.
  38.   -- don't forget to set time limit as described in Exam button of
  39.   -- first card.
  40.   exit idle
  41.   put the seconds into time2
  42.   if time2<time1 then exit idle
  43.   if time2ΓëÑtime1 then
  44.     answer "Too much Time. Try again?" with "OK" or "Quit"
  45.   end if
  46.   if it is "OK" then
  47.     visual effect dissolve to black
  48.     visual effect iris open
  49.     go first card
  50.     openStack
  51.   else
  52.     visual effect dissolve
  53.     go home
  54.   end if
  55. end idle
  56.  
  57. on randomNext
  58.   global group,questlist
  59.   add one to group
  60.   if group > 40 then go card report
  61.   get item group of questlist
  62.   go card it
  63. end randomNext
  64.  
  65. on randomPrev
  66.   global group,questlist
  67.   subtract one from group
  68.   if group < 1 then go first card
  69.   get item group of questlist
  70.   go card it
  71. end randomPrev
  72.  
  73. on reView
  74.   global rightone, immediate
  75.   put "Correct answer is " & rightone into field review
  76.   if not immediate then
  77.     wait 3 seconds
  78.     show field review
  79.     wait until the mouseClick
  80.   else
  81.     if hilite of background button rightone is false then
  82.       show field review
  83.       wait until the mouseClick
  84.     else
  85.       -- show background button "Correct!"
  86.     end if
  87.   end if
  88. end reView
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111. -- part 1 (field)
  112. -- low flags: 01
  113. -- high flags: 0000
  114. -- rect: left=16 top=68 right=136 bottom=500
  115. -- title width / last selected line: 0
  116. -- icon id / first selected line: 0 / 0
  117. -- text alignment: 0
  118. -- font id: 3
  119. -- text size: 10
  120. -- style flags: 0
  121. -- line height: 13
  122. -- part name: Q1
  123.  
  124.  
  125. -- part 11 (field)
  126. -- low flags: 01
  127. -- high flags: 0000
  128. -- rect: left=48 top=137 right=177 bottom=499
  129. -- title width / last selected line: 0
  130. -- icon id / first selected line: 0 / 0
  131. -- text alignment: 0
  132. -- font id: 3
  133. -- text size: 10
  134. -- style flags: 0
  135. -- line height: 13
  136. -- part name: D
  137.  
  138.  
  139. -- part 25 (button)
  140. -- low flags: 00
  141. -- high flags: 0000
  142. -- rect: left=204 top=313 right=342 bottom=241
  143. -- title width / last selected line: 0
  144. -- icon id / first selected line: 902 / 902
  145. -- text alignment: 1
  146. -- font id: 0
  147. -- text size: 12
  148. -- style flags: 0
  149. -- line height: 16
  150. -- part name: Prev
  151. ----- HyperTalk script -----
  152. on mouseUp
  153.   -- ΓÇóΓÇóΓÇóComment out last command & uncomment next to last for sequential
  154.   -- cards.  Comment out next to last and uncomment last command for
  155.   -- random cards from buildList (in background of first card of stack).
  156.   global immediate, group, questans
  157.   if visible of field review is false then
  158.     if item group of questans is not empty then
  159.       if immediate then reView
  160.     end if
  161.   end if
  162.   visual effect wipe right fast to black
  163.   visual effect wipe left
  164.   -- go to previous card  -- ΓÇóΓÇóΓÇó for sequential cards
  165.   randomPrev -- ΓÇóΓÇóΓÇó for randomly-generated cards from buildList
  166. end mouseUp
  167.  
  168.  
  169. -- part 26 (button)
  170. -- low flags: 00
  171. -- high flags: 0000
  172. -- rect: left=297 top=313 right=342 bottom=333
  173. -- title width / last selected line: 0
  174. -- icon id / first selected line: 26425 / 26425
  175. -- text alignment: 1
  176. -- font id: 0
  177. -- text size: 12
  178. -- style flags: 0
  179. -- line height: 16
  180. -- part name: Next
  181. ----- HyperTalk script -----
  182. on mouseUp
  183.   -- ΓÇóΓÇóΓÇóComment out last command & uncomment next to last for sequential
  184.   -- cards.  Comment out next to last and uncomment last command for
  185.   -- random cards from buildList (in background of first card of stack).
  186.   global immediate, group, questans
  187.   if visible of field review is false then
  188.     if item group of questans is not empty then
  189.       if immediate then reView
  190.     end if
  191.   end if
  192.   visual effect wipe left fast to black
  193.   visual effect wipe right fast
  194.   -- go to next card -- ΓÇóΓÇóΓÇó for sequential cards
  195.   randomNext -- ΓÇóΓÇóΓÇó for randomly-generated cards from buildList
  196. end mouseUp
  197.  
  198.  
  199.  
  200. -- part 27 (field)
  201. -- low flags: 01
  202. -- high flags: 0000
  203. -- rect: left=48 top=178 right=219 bottom=508
  204. -- title width / last selected line: 0
  205. -- icon id / first selected line: 0 / 0
  206. -- text alignment: 0
  207. -- font id: 3
  208. -- text size: 10
  209. -- style flags: 0
  210. -- line height: 13
  211. -- part name: D
  212.  
  213.  
  214. -- part 28 (field)
  215. -- low flags: 01
  216. -- high flags: 0000
  217. -- rect: left=48 top=221 right=262 bottom=508
  218. -- title width / last selected line: 0
  219. -- icon id / first selected line: 0 / 0
  220. -- text alignment: 0
  221. -- font id: 3
  222. -- text size: 10
  223. -- style flags: 0
  224. -- line height: 13
  225. -- part name: D
  226.  
  227.  
  228. -- part 29 (field)
  229. -- low flags: 01
  230. -- high flags: 0000
  231. -- rect: left=47 top=264 right=306 bottom=502
  232. -- title width / last selected line: 0
  233. -- icon id / first selected line: 0 / 0
  234. -- text alignment: 0
  235. -- font id: 3
  236. -- text size: 10
  237. -- style flags: 0
  238. -- line height: 13
  239. -- part name: D
  240.  
  241.  
  242. -- part 20 (field)
  243. -- low flags: 00
  244. -- high flags: 0004
  245. -- rect: left=15 top=31 right=53 bottom=166
  246. -- title width / last selected line: 0
  247. -- icon id / first selected line: 0 / 0
  248. -- text alignment: 0
  249. -- font id: 0
  250. -- text size: 12
  251. -- style flags: 0
  252. -- line height: 16
  253. -- part name: Q#
  254. ----- HyperTalk script -----
  255.  
  256.  
  257.  
  258.  
  259. -- part 36 (button)
  260. -- low flags: 00
  261. -- high flags: 0000
  262. -- rect: left=368 top=305 right=342 bottom=406
  263. -- title width / last selected line: 0
  264. -- icon id / first selected line: 21700 / 21700
  265. -- text alignment: 1
  266. -- font id: 0
  267. -- text size: 12
  268. -- style flags: 0
  269. -- line height: 16
  270. -- part name: Home
  271. ----- HyperTalk script -----
  272. on mouseUp
  273.   visual effect iris close
  274.   go home
  275. end mouseUp
  276.  
  277.  
  278.  
  279.  
  280. -- part 38 (button)
  281. -- low flags: 80
  282. -- high flags: 8002
  283. -- rect: left=173 top=116 right=138 bottom=245
  284. -- title width / last selected line: 0
  285. -- icon id / first selected line: 0 / 0
  286. -- text alignment: 1
  287. -- font id: 0
  288. -- text size: 12
  289. -- style flags: 0
  290. -- line height: 16
  291. -- part name: Correct!
  292.  
  293.  
  294. -- part 39 (button)
  295. -- low flags: 00
  296. -- high flags: 8005
  297. -- rect: left=14 top=138 right=174 bottom=44
  298. -- title width / last selected line: 0
  299. -- icon id / first selected line: 0 / 0
  300. -- text alignment: 1
  301. -- font id: 0
  302. -- text size: 12
  303. -- style flags: 0
  304. -- line height: 16
  305. -- part name: A
  306. ----- HyperTalk script -----
  307. on mouseUp
  308.   global questans, group
  309.   set hilight of background button A to true
  310.   set hilight of background button B to false
  311.   set hilight of background button C to false
  312.   set hilight of background button D to false
  313.   put "A" into item group of questans
  314. end mouseUp
  315.  
  316.  
  317.  
  318. -- part 40 (button)
  319. -- low flags: 00
  320. -- high flags: 8005
  321. -- rect: left=14 top=178 right=214 bottom=44
  322. -- title width / last selected line: 0
  323. -- icon id / first selected line: 0 / 0
  324. -- text alignment: 1
  325. -- font id: 0
  326. -- text size: 12
  327. -- style flags: 0
  328. -- line height: 16
  329. -- part name: B
  330. ----- HyperTalk script -----
  331. on mouseUp
  332.   global questans, group
  333.   set hilight of background button A to false
  334.   set hilight of background button B to true
  335.   set hilight of background button C to false
  336.   set hilight of background button D to false
  337.   put "B" into item group of questans
  338. end mouseUp
  339.  
  340.  
  341.  
  342. -- part 41 (button)
  343. -- low flags: 00
  344. -- high flags: 8005
  345. -- rect: left=14 top=219 right=255 bottom=44
  346. -- title width / last selected line: 0
  347. -- icon id / first selected line: 0 / 0
  348. -- text alignment: 1
  349. -- font id: 0
  350. -- text size: 12
  351. -- style flags: 0
  352. -- line height: 16
  353. -- part name: C
  354. ----- HyperTalk script -----
  355. on mouseUp
  356.   global questans, group
  357.   set hilight of background button A to false
  358.   set hilight of background button B to false
  359.   set hilight of background button C to true
  360.   set hilight of background button D to false
  361.   put "C" into item group of questans
  362. end mouseUp
  363.  
  364.  
  365.  
  366. -- part 42 (button)
  367. -- low flags: 00
  368. -- high flags: 8005
  369. -- rect: left=14 top=264 right=300 bottom=44
  370. -- title width / last selected line: 0
  371. -- icon id / first selected line: 0 / 0
  372. -- text alignment: 1
  373. -- font id: 0
  374. -- text size: 12
  375. -- style flags: 0
  376. -- line height: 16
  377. -- part name: D
  378. ----- HyperTalk script -----
  379. on mouseUp
  380.   global questans, group
  381.   set hilight of background button A to false
  382.   set hilight of background button B to false
  383.   set hilight of background button C to false
  384.   set hilight of background button D to true
  385.   put "D" into item group of questans
  386. end mouseUp
  387.  
  388.  
  389.  
  390. -- part 43 (field)
  391. -- low flags: 81
  392. -- high flags: 0004
  393. -- rect: left=339 top=119 right=137 bottom=498
  394. -- title width / last selected line: 0
  395. -- icon id / first selected line: 0 / 0
  396. -- text alignment: 0
  397. -- font id: 3
  398. -- text size: 12
  399. -- style flags: 256
  400. -- line height: 16
  401. -- part name: review
  402.